<meta http-equiv="Expires" content="0">
<meta http-equiv="Last-Modified" content="0">
<meta http-equiv="Cache-Control" content="no-cache, mustrevalidate">
<meta http-equiv="Pragma" content="no-cache">
<%-- 
    Document   : principal
    Created on : 07/11/2012, 01:21:57 PM
    Author     : Izhar Gamaliel Hernandez Cruz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ taglib uri="/struts-tags" prefix="s" %>

<html>
    <head>
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/estilo.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/Js/jquery-1.8.2.js"></script>
 		<script type="text/javascript" src="${pageContext.request.contextPath}/Js/Home/teclas.js"></script> 
		<script type="text/javascript" src="${pageContext.request.contextPath}/Js/Login/jquery.bpopup.min.js"></script> 
	
	<script type="text/javascript">
	$(document).ready(function(){ 
 		$(document).jkey('ctrl+f1',function(){
			$('#buscar').bPopup();
 			});
		
 		
 		
 		$('#searchKn').click(function() {
 			$.ajax({
 				url : 'searchKnKey', // action to be perform
 				dataType : 'html',
 				data : {
 					knkey : $("#knkey").val()
 				},
 				success : function(html) {
 					$('#contenidoKn').html(html); // set result.jsp output to leftDiv
 				},
 				error : function(xhr, ajaxOptions, thrownError) {
 					alert('An error occurred! ' + thrownError);
 				},
 			});
 		});

 	
	
	}); 
	</script>
	
        <title>Main ho</title>
    </head>
    <body>
        
        <s:div cssClass="contenidoAzul">
            <jsp:include page="/jsp/encabezado.jsp" flush="true" />
            <s:div cssClass="divBlanco"></s:div>
            <s:div cssClass="contenidoFormLogin"></s:div>
        </s:div>
    
        
        <s:div align="center">
            <s:form action="SelectComboKnkey">
                <div align="center">
                    <table border="1" class="listado2">
                        <tr style="background: lightskyblue">
                            <td>
                                KNKEY
                            </td>
                            <td>
                                Company Name
                            </td>
                            <td>
                                Status
                            </td>
                            <td>
                                Creation Date
                            </td>
                            <td>
                                Updated
                            </td>
                            <td>
                                Action
                            </td>
                        </tr>
                        <s:iterator value="listaTablaBeans">
                            <tr>
                                <td>
                                    <s:property value="knkey"/>
                                </td>
                                <td>
                                    <s:property value="companyname" />
                                </td>
                                <td>
                                    <s:property value="statusTrans" />
                                </td>
                                <td>
                                    <s:property value="creation" />
                                </td>
                                <td>
                                    <s:if test="updated == true">
                                        <img src="${pageContext.request.contextPath}/Imagenes/accept.png" />
                                    </s:if>
                                </td>
                                
                                <td>
                                    <s:if test="%{#session.usuarioSession.transition == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyName"></s:param>
                                            <s:param value="id" name="idTransition"/>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:if>
                                    <s:elseif test="%{#session.usuarioSession.Impl == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey1">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyname"></s:param>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:elseif>
                                    <s:elseif test="%{#session.usuarioSession.COP == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey2">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyname"></s:param>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:elseif>
                                </td>
                            </tr>
                        </s:iterator>
                    </table>
                    </br>
                    </br>
                    </br>
                </div>

                <table align="center"><tr><td>

                        </td></tr>
                </table> 
                                                                  
            </s:form>
        </s:div>

        <s:div cssClass="divBlanco"></s:div>
        <s:div cssClass="contenidoAzul">
            <jsp:include page="/jsp/pie.jsp" flush="true" />
        </s:div>
        
         <div id="buscar" class="buscarKN">
         <div> <p class="logo">Search KNKEY </p></div>
          
         		
         	<div >
         	Inserted KnKey:<input type="text" name="knkey" id="knkey"> 
         	<button type="submit" id="searchKn" class="center btn btn-primary">
								OK</button>
         	</div>
         	<br/>
         	<div id="contenidoKn">
         	
         	</div>
         </div>
    </body>
</html>
